﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using EnvDTE100;
using System.Xml.Linq;

namespace SimpleExeProgram
{
    class Program
    {
        static void Main(string[] args)
        {
            var filename1 = @"C:\Work\MSTest\AcceptanceTesting\TestData\Conversions\Test\ConversionsTest\ConversionsTest.vcxproj";
            var filename2 = @"C:\Work\MSTest\AcceptanceTesting\TestData\Conversions\Implementation\Conversions\Conversions.vcxproj";
            XDocument doc = XDocument.Load(filename2);


            var elements = doc.Elements();

            var projectname = doc.Descendants("ProjectName");
            Console.WriteLine("FOUND NAME");
            //printElems(elements);

            ///var elem = doc.Element("TargetName");

        }
        private static void printElems(IEnumerable<XElement> elements)
        {
            foreach (var elem in elements)
            {
                if (!string.IsNullOrEmpty(elem.Value))
                {
                    Console.WriteLine("Elemenet Name: " + elem.Name.LocalName + " Value: " + elem.Value);
                }
                printElems(elem.Elements());
            }
        }
    }
}
